package com.itheima.file;

import java.io.File;
import java.io.IOException;

public class Demo4 {
    public static void main(String[] args) throws IOException {
        File file =new File("d:");
        //boolean newFile = file.createNewFile();
        File[] files = file.listFiles();
        if(files!=null){
            for (int i = 0; i < files.length; i++) {
                System.out.println(files[i]);
            }
        }
        System.out.println(files);

    }
}
